package com.nassir.chatroom.test;

import java.awt.FlowLayout;
import javax.swing.*;

public class Window2 extends JFrame {
	String id = "";
	JTextField text = new JTextField(10);
	JLabel label = new JLabel("帐号");

	public Window2(String id) {// 带参数的构造函数
		this.id = id;
		init();
		setBounds(600, 200, 200, 200);
		setVisible(true);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}

	public void init() {
		setLayout(new FlowLayout());
		add(label);
		add(text);
		// text.setEnabled(false);
		text.setText(id);
	}
}
